<?php

use yii\db\Migration;

/**
 * Class m221123_111520_rbac_add_my_decree_permission
 */
class m221123_111520_rbac_add_my_decree_permission extends Migration
{
    /**
    * {@inheritdoc}
    */
   public function safeUp()
   {
       $auth = Yii::$app->authManager;

       $permissionCreate = $auth->createPermission('browseMyDecree');
       $auth->add($permissionCreate);

   }

   /**
    * {@inheritdoc}
    */
   public function safeDown()
   {
       $auth = Yii::$app->authManager;

       $auth->remove($auth->getPermission('browseMyDecree'));
   }
}
